package account
/**
模版消息
 */
import (
  "fmt"
  "gitee.com/yizhisamoye/GoWeChat/entity/templateMsg"
  "gitee.com/yizhisamoye/GoWeChat/utils"
)

/**
模版消息
*/

//发送模版消息
func (w WxAccount)SendTemplateMsg(msg templateMsg.WxTemplateMsg)error{
 url := fmt.Sprintf(BaseUrl+"/cgi-bin/message/template/send?access_token=%s", w.GetAccessToken())

 _, err := utils.SendJson(url,msg)
 if err!=nil{
   return err
 }
 return nil
}
